package com.dsg.entity.apply;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * DDA設立記錄子表
 * </p>
 *
 * @author system
 * @since 2020-10-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("dsg_apply_dda_sub")
@ApiModel(value="DsgApplyDdaSub对象", description="DDA設立記錄子表")
public class DsgApplyDdaSub implements Serializable {
    /**DDA結果（我们系统变更）*/
    public static final int DDA_TYPE_RESULT = 1;
    /**DDA Change（银行系统变更）*/
    public static final int DDA_TYPE_CHANGE = 2;

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主鍵")
    @TableId("OID")
    private String oid;

    @ApiModelProperty(value = "申请类型")
    @TableField("APP_TYPE")
    private Integer appType;

    @ApiModelProperty(value = "外鍵")
    @TableField("PID")
    private String pid;

    @ApiModelProperty(value = "申请单号")
    @TableField("APP_NO")
    private String appNo;

    @ApiModelProperty(value = "狀態")
    @TableField("DDA_STATUS")
    private Integer ddaStatus;

    @ApiModelProperty(value = "操作类型")
    @TableField("DDA_TYPE")
    private Integer ddaType;

    @ApiModelProperty(value = "下載時間")
    @TableField("DOWNLOAD_TIME")
    private Date downloadTime;

    @ApiModelProperty(value = "創建人")
    @TableField("CREATER")
    private String creater;

    @ApiModelProperty(value = "創建時間")
    @TableField("CREATE_TIME")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("UPDATER")
    private String updater;

    @ApiModelProperty(value = "更新時間")
    @TableField("UPDATE_TIME")
    private Date updateTime;

    @ApiModelProperty(value = "附件外鍵")
    @TableField("REL_ID")
    private String relId;

    @ApiModelProperty(value = "上传时间")
    @TableField("UPLOAD_TIME")
    private Date uploadTime;

    @ApiModelProperty(value = "项目")
    @TableField("RET_ITEM")
    private String retItem;

    @ApiModelProperty(value = "备注")
    @TableField("RET_REMARKS")
    private String retRemarks;

    @ApiModelProperty(value = "扣款/支付限制")
    @TableField(exist = false)
    private BigDecimal payLimit;

    @ApiModelProperty(value = "扣款周期")
    @TableField(exist = false)
    private String prdty;

    /************************枚舉**********************/
    public enum AppStatus {
        not(0), already(1), fail(2), success(3);
        Integer code;

        AppStatus(int code) {
            this.code = code;
        }

        public Integer getCode() {
            return code;
        }
    }
}
